package com.hakim.wfb.common.enums;

/**
 * 积分提现状态
 */
public enum WithdrawStatusEnum {

    PROCESSING(1, "处理中"),
    SUCCESS(2, "成功"),
    FAIL(3, "失败"),
    ERROR(4, "错误");

    private int value;
    private String description;

    private WithdrawStatusEnum(int value, String description) {
        this.value = value;
        this.description = description;
    }

    public int getValue() {
        return value;
    }

    public String getDescription() {
        return description;
    }

    public static WithdrawStatusEnum getByValue(int value) {
        WithdrawStatusEnum[] codes = values();
        for (WithdrawStatusEnum each : codes) {
            if (each.value == value) {
                return each;
            }
        }
        return null;
    }
}
